Skip to content

Hotfix: /ai-atlas/story and /ai-atlas/ladder - #251

Closed
manager wants to merge 1 commit into
mainfrom
hotfix/atlas-tab-urls
Closed

manager wants to merge 1 commit into
mainfrom
hotfix/atlas-tab-urls

Conversation

@manager

@manager manager commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Story and Ladder get their own addresses. /ai-atlas stays on the map; /ai-atlas/story and /ai-atlas/ladder open the Atlas on that reading, prerendered in en, ru and hy with their own canonical URL. Old #article and #ladder links forward to the new pages; the guide push revalidates all three.

Checks: full production build passes and prerenders the six reading pages, each opening on its own tab; no OffSec lines in the diff; tsc clean.

Unmerged until Wolf gives the go.

🤖 Generated with Claude Code

/ai-atlas stays on the map; /ai-atlas/story and /ai-atlas/ladder open
the Atlas on that reading, prerendered in every locale with their own
canonical URL. Tabs navigate between the three pages; old #article and
#ladder links land on the new pages. The guide push revalidates all
three. The Terminal's frame, which passes no navigation, keeps switching
in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Claude finished @manager's task in 23s —— View job


Review of #251: /ai-atlas/story and /ai-atlas/ladder

I read the diff and the surrounding getStaticProps and SeoGenerator usage. I did not run the build, tsc or the app. The PR description says the build and tsc pass, and I haven't re-checked that.

Overall: the approach is sound and small. A [tab].tsx route with fallback: false covers all three locales. The guide push now revalidates all nine URLs. Passing window.history.state to replaceState is the right fix for keeping Back working between the tab pages. Nothing blocks the merge. The first two items below are worth a look before Wolf gives the go.

1. All three URLs share one SEO block (src/pages/ai-atlas.tsx, AiAtlasPage).

  • SeoGenerator receives the same seoTitle, description and OG data whatever tab is. /ai-atlas/story and /ai-atlas/ladder therefore get the same <title> and meta description as the map.
  • The PR says each page has its "own canonical URL". I did not check whether SeoGenerator derives the canonical from the route. If it does, the pages are canonical to themselves but still duplicate in title and description.
  • Per-tab SEO copy (even a suffix such as · Story) would make the new addresses useful in search.

2. Navigation timing in changeTab.

  • With onTabChange, the code adds is-leaving, sets tabPending.current = true, then calls router.push after the timeout and returns early.
  • Neither flag is reset on that path. Remounting through key={tab} clears them once the new page renders.
  • If the push fails or is cancelled (a rapid second click, or a failed fetch of the static JSON), the stage stays faded and every later click on a tab is ignored. A .catch or routeChangeError handler that clears tabPending and is-leaving would cover it.

3. Minor points.

  • key={tab} remounts the whole Atlas on every tab change, which discards map state such as viewMode and focusedNode. That seems intended, since the tab is a separate page. Coming back to the map via /ai-atlas also restarts at the default view, and #security or node hashes only restore on a full load.
  • src/pages/ai-atlas/[tab].tsx imports a page module for its exports (TAB_SLUGS, getStaticProps). It works, but moving TAB_SLUGS and tabPath to @lib/aiAtlas would keep them out of the page file. This is also why the ai-atlas.tsx page file now exports non-page values.
  • TAB_SLUGS is typed Record<string, string> and Tab is not exported. A Record<Exclude<Tab, 'atlas'>, string> would let tabPath and the TAB_BY_SLUG lookup be exhaustive without casting to string.
  • const atlas: any = await atlasStaticProps(context) uses any and ignores the redirect and notFound result variants. It is fine today because the atlas getStaticProps only returns props.

4. Conventions. No App Router patterns, no new state libraries, no inline styles, no UX Core data changes, and no new global CSS. The new route and the guide.ts paths are the only new surface.

Not covered. I didn't check a live run, the redirect from old #article and #ladder links in a browser, or the Terminal frame without onTabChange.

@manager

manager commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Superseded: the tab is renamed to Thesis (/ai-atlas/thesis) and ships together with the Russian Atlas in one release PR.

@manager manager closed this Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant